package org.blogwu.learn.designpattern.chapter9.v2;

import java.text.MessageFormat;

public class MailUtil {

    public static void sendMail(Mail mail) {
        String outputContent = "向{0},邮件地址{1},邮件内容:{2} 发送成功！";
        System.out.println(MessageFormat.format(outputContent, mail.getName(), mail.getEmailAddress(), mail.getContent()));
    }

    /**
     * 记录初始化模板
     *
     * @param mail
     */
    public static void saveOriginMailRecord(Mail mail) {
        System.out.println("存储originMail记录，originMail：" + mail.getContent());
    }

}
